<?php
namespace Modules\Good\Requests;

use Illuminate\Foundation\Http\FormRequest;

class GoodsRequest extends FormRequest{
    public function authorize(){return true;}
    public function rules(){
        return [
            'user_id' => 'required|integer',
            'title' => 'required|max:255',
            'category_id' => 'required|integer',
            'description' => 'required|string',
            'price' => 'required|min:0',
            'stock' => 'required|integer|min:0',
            'cover' => 'required|string',
            'pics' => 'required|array',
            'detail' => 'required|string',
        ];
    }
}
